<?php /* Smarty version 2.6.13, created on 2011-12-01 17:05:16
         compiled from manage_editproduct.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('block', 't', 'manage_editproduct.tpl', 16, false),array('modifier', 'replace', 'manage_editproduct.tpl', 35, false),)), $this); ?>
<div class="wrap">
<table width="100%" height="100%" cellpadding="0" cellspacing="0">
	<tr>
	<td width="54px" height="43px" class="fr_lefttop"></td>
	<td height="43px" class="fr_centertop" ></td>
	<td width="48px" height="43px" class="fr_righttop"></td>
	</tr>
	<tr>
	<td width="54px" class="fr_leftmiddle" >&nbsp;</td>
	<td class="fr_centermiddle">
<?php if ($_COOKIE['message'] != null): ?>
	<div id="ajaxResponse1" class="ajaxResponse fade" style="display:block"><?php echo $_COOKIE['message']; ?>
</div>
<?php else: ?>    
	<div id="ajaxResponse1" class="ajaxResponse fade" style="display:none"></div>
<?php endif; ?>
<h2><?php $this->_tag_stack[] = array('t', array()); $_block_repeat=true;smarty_block_t($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Edit Product<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_t($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?></h2>
<form name="editproduct" enctype="multipart/form-data" id="editproduct" method="post" action="?<?php echo $_SERVER['QUERY_STRING']; ?>
">
	<input type="hidden" name="act" value="editproduct" />
	<input type="hidden" name="id" value="<?php echo $_GET['id']; ?>
" />
    <input type="hidden" name="url" value="?mod=<?php echo $_GET['mod']; ?>
&sub1=<?php echo $_GET['sub1']; ?>
" />	
    <input type="hidden" name="total_photos" id="total_photos" value="2" />
	<table class="editform" width="100%" cellspacing="2" cellpadding="5">
		<tr>
			<th scope="row" valign="top">
			<label for="cat_parent"><?php $this->_tag_stack[] = array('t', array()); $_block_repeat=true;smarty_block_t($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Category:<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_t($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?></label></th>
			<td>        
	  			<select name='cat_parent' id='cat_parent' class='postform'>
	  				<option value='0'><?php $this->_tag_stack[] = array('t', array()); $_block_repeat=true;smarty_block_t($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>None<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_t($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?></option>
		  			<?php $_from = $this->_tpl_vars['CATS']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['cat'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['cat']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['item']):
        $this->_foreach['cat']['iteration']++;
?>
		  				<?php if ($this->_tpl_vars['PRODUCT']->category_id == $this->_tpl_vars['item']->cat_ID): ?>
		  					<option selected id='cat_parent-<?php echo $this->_tpl_vars['item']->cat_ID; ?>
' value='<?php echo $this->_tpl_vars['item']->cat_ID; ?>
'>
		  				<?php else: ?>
							<option id='cat_parent-<?php echo $this->_tpl_vars['item']->cat_ID; ?>
' value='<?php echo $this->_tpl_vars['item']->cat_ID; ?>
'>
						<?php endif; ?>
						<?php echo ((is_array($_tmp=$this->_tpl_vars['item']->temp_name)) ? $this->_run_mod_handler('replace', true, $_tmp, "—", "&nbsp;&nbsp;&nbsp;") : smarty_modifier_replace($_tmp, "—", "&nbsp;&nbsp;&nbsp;")); ?>
 ( <?php echo $this->_tpl_vars['item']->cat_type_name; ?>
 )
					</option>
					<?php endforeach; endif; unset($_from); ?>
				</select>
	  		</td>
		</tr>
		<tr>
			<th scope="row" valign="top">
			<label for="product_status"><?php $this->_tag_stack[] = array('t', array()); $_block_repeat=true;smarty_block_t($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Status:<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_t($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?></label></th>
			<td>
				<?php if ($this->_tpl_vars['PRODUCT']->status == 'normal'): ?>
	  				<?php $this->assign('isNormal', 'selected'); ?>
                <?php elseif ($this->_tpl_vars['PRODUCT']->status == 'hot'): ?>
	  				<?php $this->assign('isHot', 'selected'); ?>    
	  			<?php else: ?>
	  				<?php $this->assign('isNew', 'selected'); ?>
	  			<?php endif; ?>
	  			<select name='product_status' id='product_status' class='postform'>
					<option <?php echo $this->_tpl_vars['isNormal']; ?>
 value='normal'><?php $this->_tag_stack[] = array('t', array()); $_block_repeat=true;smarty_block_t($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Normal<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_t($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?></option>
					<option <?php echo $this->_tpl_vars['isNew']; ?>
 value='new'><?php $this->_tag_stack[] = array('t', array()); $_block_repeat=true;smarty_block_t($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>New<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_t($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?></option>
                    <option <?php echo $this->_tpl_vars['isHot']; ?>
 value='hot'><?php $this->_tag_stack[] = array('t', array()); $_block_repeat=true;smarty_block_t($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Hot<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_t($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?></option>
				</select>
	  		</td>
		</tr>
		<tr>
			<th width="33%" scope="row" valign="top">
			<label for="product_name"><?php $this->_tag_stack[] = array('t', array()); $_block_repeat=true;smarty_block_t($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Model name:<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_t($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?></label></th>
			<td width="67%">
			<input name="product_name" id="product_name" type="text" value="<?php echo $this->_tpl_vars['PRODUCT']->product_name; ?>
" size="50" /></td>
		</tr>
		<tr>
			<th width="33%" scope="row" valign="top">
			Product name image:</th>
			<td width="67%">
			<input type="file" name="product_name_img"/>
            </td>
		</tr>
        <tr>
			<th width="33%" scope="row" valign="top">
			</th>
			<td width="67%">
			<img src="<?php echo $this->_tpl_vars['PATHLOGO'];  echo $this->_tpl_vars['PRODUCT']->product_name_img; ?>
" />
            </td>
		</tr>
		<tr>
			<th width="33%" scope="row" valign="top">
			Product thumbnail:</th>
			<td width="67%">
			<input type="file" name="product_thumbnail"/>
            </td>
		</tr>
        <tr>
			<th width="33%" scope="row" valign="top">
			</th>
			<td width="67%">
			<img src="<?php echo $this->_tpl_vars['PATH'];  echo $this->_tpl_vars['PRODUCT']->product_image; ?>
" />
            </td>
		</tr>
        <tbody id="product_photos">
        <tr>
			<th width="33%" scope="row" valign="top">
			Image 1:</th>
			<td width="67%">
			<input type="file" name="product_image_1" />
            </td>
		</tr>
        <tr>
			<th width="33%" scope="row" valign="top">
			Image 2:</th>
			<td width="67%">
			<input type="file" name="product_image_2" />
            </td>
		</tr>
        </tbody>
        <tr>
			<th width="33%" scope="row" valign="top">
			</th>
			<td width="67%">
			<a href="javascript: void(0)" onclick="onAddProductPhotos('product_photos','total_photos');">Add images</a>
            </td>
		</tr>
         <tr>
			<th width="33%" scope="row" valign="top">
			</th>
			<td width="67%">
				<div class="frame_photos_product">
                    <?php $_from = $this->_tpl_vars['PHOTOS']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['photos'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['photos']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['item']):
        $this->_foreach['photos']['iteration']++;
?>
                        <div class="photos_one left" id="photos_one_<?php echo $this->_tpl_vars['item']->id; ?>
">
                            <img src="<?php echo $this->_tpl_vars['PATH'];  echo $this->_tpl_vars['item']->product_photo; ?>
" class="viewthumb"/>
                            <div class="frame_del_photos">
                                <a href="javascript: void(0)" onclick="onDeletePhotos('?<?php echo $_SERVER['QUERY_STRING']; ?>
', '<?php echo $this->_tpl_vars['item']->id; ?>
', '<?php echo $this->_tpl_vars['item']->product_photo; ?>
', 'ajaxResponse1')" >
                                    <img src="includes/images/object_delete.png" alt="Delete" />	
                                </a>    
                            </div>
                        </div>	
                    <?php endforeach; endif; unset($_from); ?>
                    <div class="clear"></div>
                </div>
            </td>
		</tr>
        <tr>
			<th width="33%" scope="row" valign="top">
			<label for="product_name"><?php $this->_tag_stack[] = array('t', array()); $_block_repeat=true;smarty_block_t($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Price:<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_t($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?></label></th>
			<td width="67%">
			<input name="price" id="price" type="text" value="<?php echo $this->_tpl_vars['PRODUCT']->price; ?>
" size="50" /></td>
		</tr>
		<tr>
			<th scope="row" valign="top">
			<label for="short_info"><?php $this->_tag_stack[] = array('t', array()); $_block_repeat=true;smarty_block_t($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Short Description:<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_t($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?></label></th>
			<td><textarea name="short_info" id="short_info" rows="5" cols="50" style="width: 97%;"><?php echo $this->_tpl_vars['PRODUCT']->short_info; ?>
</textarea></td>
		</tr>
		<tr>
			<th scope="row" valign="top">
			<label for="description"><?php $this->_tag_stack[] = array('t', array()); $_block_repeat=true;smarty_block_t($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Description (optional):<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_t($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?></label></th>
			<td><textarea name="description" id="description" rows="5" cols="50" style="width: 97%;"><?php echo $this->_tpl_vars['PRODUCT']->description; ?>
</textarea></td>
		</tr>
        <tr>
			<th width="33%" scope="row" valign="middle">
			<label for="status">Active</label></th>
			<td width="67%">
				<input name="active" id="active" <?php if ($this->_tpl_vars['PRODUCT']->pro_active == '1'): ?> checked="checked" <?php endif; ?> type="checkbox" value="1"/>
			</td>
		</tr>
	</table>
	<p class="submit" align = "right">
		<input type="submit" name="submit" onclick="$('type').value='ajax';" value="<?php $this->_tag_stack[] = array('t', array('escape' => false)); $_block_repeat=true;smarty_block_t($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Update Product &raquo;<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_t($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?>" />
	</p>
</form>
</td>
	<td width="48px" class="fr_rightmiddle"></td>
	</tr>
	<tr>
	<td width="54px" height="60px" class="fr_leftbot" ></td>
	<td height="60px" class="fr_centerbot"></td>
	<td width="48px" height="60px" class="fr_rightbot" ></td>
	</tr>
</table>
</div>